core: Ensure data is properly initialized
authorColin Walters <walters@verbum.org>
Sat, 19 Nov 2011 15:45:53 +0000 (10:45 -0500)
committerColin Walters <walters@verbum.org>
Sat, 19 Nov 2011 15:45:53 +0000 (10:45 -0500)
Avoids a crash if we bail early.

src/ostree/ot-builtin-local-clone.c

index 11a45031331d8eb6b556982b4096496a20e90e10..d9227a22ec2e1acd97fa5700180dd8450b320933 100644 (file)
@@ -158,6 +158,8 @@ ostree_builtin_local_clone (int argc, char **argv, const char *repo_path, GError
   context = g_option_context_new ("DEST ... - Create new repository DEST");
   g_option_context_add_main_entries (context, options, NULL);
 
+  memset (&data, 0, sizeof (data));
+
   if (!g_option_context_parse (context, &argc, &argv, error))
     goto out;